home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
UpTime Volume 2 #2
/
utv2n2s2.d64
/
vision times
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-28
|
8KB
|
235 lines
1 clr
10 poke53280,0:poke53281,0:poke 53269,0
15 a1=1
20 dims(9),s$(11),se$(11),nu$(10,3)
100 gosub 4000
105 gosub10000
110 gosub21000:gosub 3700
120 v=6:h=9:tx$="[158][196]o you need a lesson?":gosub 3200
130 v=8:h=15:tx$="[159]( [217] [159]/ [206] [159])":gosub 3200
150 pa=1:lo=0:gosub 2100:ifa$="y"ora$="[217]"thengosub20000:goto 160
151 if a$="n" or a$="[206]" then 160
152 goto 120
160 pa=0:gosub5000:ru=1:gosub1000:gosub 3700:if op<>3 then 191
174 gosub 500:gosub 3700
191 v=10:tx$="[196]o you want to play again? ":gosub3000
200 v=12:h=15:tx$="[159]( [217] [159]/ [206] [159])":gosub 3200:lo=0:gosub 2100
220 ifa$="y"ora$="[217]"then gg=0:nn=0:n=0:g=0:goto 160
221 if a$="n" or a$="[206]" then 230
222 goto 191
230 sys 8*4096+4
240 stop
500 v=10:h=0:tx$="[217]ou got"+str$(n)+" right out of"+str$(gg)+" problems"
501 print chr$(14):gosub3200:v=12:delay=7
540 tx$="for "+str$(int(((n/gg)*100)+.5))+"%.":gosub 3200:gosub 2000:return
1000 rem *** central routine ***
1005 hp=0:mi=0
1007 print"[147]";chr$(142);
1010 fori=1tonp
1020 gosub19000
1030 gosub3600
1040 gosub11000:h=0:v=24
1066 tx$="":gosub3200:print" <return> to continue, <f8> to exit [146]";:lo=0
1069 geta$:if a$=chr$(13) then 1075
1070 if a$=chr$(140) then pa=0:return
1072 goto 1069
1075 nexti:pa=0: return
2000 rem *** timer ***
2010 ti$="000000"
2015 geta$:ifa$<>""then2030
2020 ifti/60<delaythen2015
2030 return
2100 rem *** get character ***
2110 geta$:ifa$=""then2110
2115 if a$="[140]" then 230
2120 a=val(a$):ifa<loora>hithen2110
2130 ifpa=1 then return
2140 print a$:return
3000 rem *** center text ***
3010 ln=len(tx$):h=(40-ln)/2:gosub 3200:return
3100 v=24:tx$=" <[210][197][212][213][210][206]> to [195]ontinue. [146]":gosub3000:lo=0
3130 get a$:ifa$=chr$(13) then return
3140 goto 3130
3200 rem *** hor/ver tab ***
3240 print""left$(vt$,v)tab(h);tx$;:return
3500 rem *** line across screen ***
3510 print"";:for q=1 to 10
3530 print"[192][192][192][192]";:next q
3575 print"";:return
3600 rem *** print screen header ***
3610 print"[147]":tx$="vision software presents:":h=10:v=1:gosub 3200
3660 tx$=t$:print"";:h=10:v=3:gosub 3200:print "";:print:gosub3500:return
3700 rem *** print screen header ***
3710 print"[147]"
3740 h=10:tx$="[214][201][211][201][207][206][160][211][207][198][212][215][193][210][197] and":v=0:gosub 3200
3750 tx$="[213]p[212]ime [205]agazine [208]resents:":h=10:v=1:gosub 3200
3760 tx$="[214]ision [212]imes"
3765 print"[150]";:h=10:v=3:gosub 3200:print"";:print:gosub 3500:return
4000 rem *** read data ***
4010 readt$:fori=1to6:read rw$(i):nexti:for i=1to3:readop$(i):nexti
4070 for i=1 to 4: read co(i):nexti:fori=0to9:forj=1to3:readnu$(i,j):nextj
4071 next i:fori=1to6:readg$(i):nexti
4075 vt$=""
4080 return
4100 rem *** program data ***
4110 data"vision times"
4120 data"great!","fantastic!","super!"
4130 data"you're really going now!","yes! yes! yes!","that's great!"
4140 data"[211]ee examples done."
4150 data"[196]o problems with help."
4160 data"[196]o problems yourself."
4170 data 30,28,31,158
4180 data"[213][192][201]","[221] [221]","[202][192][203]"
4190 data" [174] "," [221] "," [177] "
4200 data"[213][192][201]","[213][192][203]","[173][192][192]"
4210 data"[192][192][201]","[192][192][179]","[192][192][203]"
4220 data"[213] [174]","[173][192][219]"," [177]"
4230 data"[176][192][201]","[173][192][201]","[192][192][203]"
4240 data"[213][192] ","[171][192][201]","[202][192][203]"
4250 data"[176][192][174]"," [213][203]"," [177] "
4260 data"[213][192][201]","[171][192][179]","[202][192][203]"
4270 data"[213][192][201]","[202][192][179]","[202][192][203]"
4280 data"[215]","[209]","[211]","[193]","[218]"," [146]"
5000 rem *** setup for math ***
5001 ifru=1then5037
5010 h=0:v=10:tx$="[159][215]hat's your first name? "
5020 gosub 3200:mx=16:gosub6000:na$=te$
5037 v=12:h=0:tx$="[159][215]ould you like to:":gosub 3200:h=7:v=14
5050 fori=1to3:tx$=str$(i)+". "+op$(i):gosub3200:v=v+1:nexti:h=0:v=v+1
5090 tx$="[159][217]our choice? (1[159]-3[159]) ":gosub 3200:lo=1:hi=3:gosub 2100:op=a:hi=10
5130 ifop=1thenhi=5
5150 v=20:h=0:tx$="[159][200]ow many problems do you want":gosub 3200:
5170 v=21:tx$="[159]to do? (2 [159]-"+str$(hi)+"[159]) [157][157]"
5180 gosub 3200:mx=2:gosub 6000:np=val(te$)
5200 ifnp<2ornp>hithen np=0:goto5170
5390 return
6000 te$="":print"[164]";
6010 get a$:if a$="" then 6010
6020 if a$=chr$(13) then print"[157] ":return
6030 if a$=chr$(20) and te$="" then 6010
6040 if a$=chr$(20) then te$=left$(te$,len(te$)-1):printa$a$"[164]";:goto 6010
6045 if a$="[140]" then gosub 3700:goto 191
6050 if len(te$)=mx then 6010
6060 if a$<" " or a$>"[218]" then 6010
6070 if a$>"z" and a$<"[193]" then 6010
6080 if a$=chr$(34) then 6010
6090 print"[157]"a$"[164]";
6100 te$=te$+a$:goto 6010
10000 rem *** do spritey things ***
10001 for i=704 to 767
10002 readx:pokei,x
10003 next
10004 poke2040,11
10005 poke53269,peek(53269)or1
10006 poke53287,2:poke53277,255:poke53271,255
10007 poke53248,30:poke53249,58
10008 return
10009 data252,252,252,121,249,248,51,243,240
10010 data7,231,224,15,207,192,7,159,128
10011 data3,63,0,0,126,0,0,252,0
10012 data0,120,0,0,48,0,0,0,0
10013 data0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
11000 rem *** see examples ***
11010 forj=1to3:v=5+j:h=8:tx$=nu$(s(1),j):gosub 3200:nextj
11060 forj=1to3:v=9 +j:h=8:tx$=nu$(s(2),j):gosub 3200:nextj:v=11:h=6:tx$="[214]"
11110 gosub3200:v=13:h=6:tx$="[192][192][192][192][192]":gosub 3200:ifop=3 then 17000
11126 tx$="make"+str$(s(1))+" rows of"+str$(s(2))+" objects.":v=20:h=0
11127 v=20:h=0:gosub 3200:co=int(rnd(1)*4)+1
11129 g=int(rnd(1)*6)+1:forj=0tos(1):v=2*j+3+(9-s(1)):h=15+(10-s(2))
11140 tx$=str$(j):ifj=0thentx$=""
11155 gosub3200:tx$="":fork=1tos(2)
11170 :ifj<>0thentx$=tx$+" "+chr$(co(co))+g$(g)+""
11180 ::ifj=0thentx$=tx$+str$(k)
11200 nextk:h=17+(10-s(2)):gosub3200:nextj:ifop<>2 then delay=1:gosub 2000
11220 v=22:h=0:tx$="count the objects to find the product.":gosub 3200
11231 ifop=2then pa=1:goto11240
11232 forj=1tos(1):v=2*j+3+(9-s(1)):h=15+(10-s(2))+(s(2)+1)*2:
11234 :tx$=""+str$(s(2)*j)+"":gosub3200:delay=.5:gosub 3200:delay=.5
11235 :gosub3200:delay=.5:gosub2000
11236 gosub2000:nextj:if rev=1 then return
11240 ifs(3)<10then12000
11250 delay=1:gosub 2000:v=14:h=4:tx$=str$(int(s(3)/10)):ifop=2 then gosub15000
11280 forj=1to3:tx$=nu$(int(s(3)/10),j):gosub 3200:v=v+1:nextj
11990 s(3)=s(3)-int(s(3)/10)*10
12000 v=14:h=8:tx$=str$(int(s(3))):delay=1:gosub2000:ifop=2 then gosub 15000
12030 forj=1to3:tx$=nu$(int(s(3)),j):gosub3200:v=v+1:nextj:return
15000 rem *** examples with help ***
15010 :v1=v:h1=h:t1$=tx$:s$=tx$:forl=2 to len(s$):v=v1+1:h=h1+l-1:tx$="^"
15040 :gosub3200:y=0:lo=0:hi=9
15060 gosub 2100:ifa$=mid$(s$,l,1) then 15150
15080 :y=y+1:ify<3then15060
15090 :v=23:tx$="enter a "+mid$(s$,l,1)+" please.[146]":gosub 3000:gosub 3200
15110 :tx$=" ":delay=1.5:gosub 2000:gosub 3200:goto15060
15150 v=v1+1:h=h1+l-1:tx$=" "
15180 :gosub3200:nextl:v=v1:h=h1:tx$=t$:return
17000 rem *** do problems ***
17010 v=16:h=0:tx$="[158]your answer: ":gosub3200:mx=3:gosub6000
17020 an=val(te$):if an=0 then 17010
17040 gg=gg+1:ifint(an)=int(s(3))then n=n+1:goto 17120
17070 v=22:tx$="sorry. the correct answer is"+str$(s(3))+".":gosub3000:delay=5
17090 rev=1:gosub 2000:gosub 11126:rev=0:return
17120 rw=int(rnd(0)*6)+1:forj=1to4:v=20
17135 :tx$=" ":gosub 3000
17140 v=20:tx$=chr$(co(j))+rw$(rw)+chr$(5):gosub3000:nextj:return
19000 rem *** math routine ***
19020 s(1)=int(rnd(1)*6)+1:s(2)=int(rnd(1)*8)+2:s(3)=s(1)*s(2):return
20000 rem *** info info info ***
20001 gosub3700:v=6:read nn:for i=1 to nn:readtx$
20005 iftx$="page"thengosub 3100:gosub 3700:v=6:goto20009
20006 h=2:ifmid$(tx$,10,1)="[163]"thenv=v+1:gosub3200:goto20009
20007 if i=8 or i=7 then v=v+1:gosub 3200:goto 20009
20008 v=v+2:gosub3200
20009 nexti:return
20011 data35
20012 data"[212]his program will help you learn"
20013 data"your multiplication tables. [217]ou"
20014 data"can count objects to find the product."
20015 data"[212]here are three ways to use the"
20016 data"program:"," 1) [211]ee examples done"
20017 data" 2) [19